﻿// InputItem类comboBox
Ext.ux.DicComboBox = Ext.extend(Ext.form.ComboBox, {
	valueField: 'Code',
	displayField: 'Name',
	//emptyText : "请选择...",
	minChars: 0,
	forceSelection: true,
	allowBlank: false,
	triggerAction: 'all',
	pageSize: 10,
	width: 150,
	listWidth: 200,
	typeAheadDelay: 10000,
	tpl: new Ext.XTemplate(
			'<div class="x-grid3"><div><table>',
			'<thead class="x-grid3-header"><tr class="x-grid3-hd-row">',
			'<td class="x-grid3-hd x-grid3-cell x-grid3-hd-inner" style="width: 100px;color: blue;">编码</td>',
			'<td class="x-grid3-hd x-grid3-cell" style="width: 150px;color: blue;">名称</td>',
			'</tr></thead><tbody>',
			'<tpl for=".">',
			'<tr class="x-combo-list-item">',
			'<td class="x-grid3-col x-grid3-cell"><div class="x-grid3-cell-inner"  style="font-size:12px;">{Code}</div></td>',
			'<td class="x-grid3-col x-grid3-cell"><div class="x-grid3-cell-inner"  style="font-size:12px;">{Name}</div></td>',
			'</tr>', '</tpl>', '</tbody></table></div></div>')
});
Ext.reg('diccombo', Ext.ux.DicComboBox);

// InputItem类comboBox
Ext.ux.IdcComboBox = Ext.extend(Ext.form.ComboBox, {
	valueField: 'Id',
	displayField: 'Name',
	//emptyText: "请选择...",
	minChars: 0,
	forceSelection: true,
	allowBlank: false,
	triggerAction: 'all',
	pageSize: 10,
	width: 150,
	listWidth: 200,
	typeAheadDelay: 10000,
	tpl: new Ext.XTemplate(
			'<div class="x-grid3"><div><table>',
			'<thead class="x-grid3-header"><tr class="x-grid3-hd-row">',
			'<td class="x-grid3-hd x-grid3-cell x-grid3-hd-inner" style="width: 100px;color: blue;">编码</td>',
			'<td class="x-grid3-hd x-grid3-cell" style="width: 150px;color: blue;">名称</td>',
			'</tr></thead><tbody>',
			'<tpl for=".">',
			'<tr class="x-combo-list-item">',
			'<td class="x-grid3-col x-grid3-cell"><div class="x-grid3-cell-inner"  style="font-size:12px;">{Code}</div></td>',
			'<td class="x-grid3-col x-grid3-cell"><div class="x-grid3-cell-inner"  style="font-size:12px;">{Name}</div></td>',
			'</tr>', '</tpl>', '</tbody></table></div></div>')
});
Ext.reg('idccombo', Ext.ux.IdcComboBox);

// 服务项目comboBox
Ext.ux.ServiceItemComboBox = Ext.extend(Ext.form.ComboBox, {
	valueField: 'Id',
	displayField: 'Name',
	emptyText: "请选择...",
	minChars: 0,
	forceSelection: true,
	triggerAction: 'all',
	pageSize: 10,
	listWidth: 600,
	typeAheadDelay: 10000,
	tpl: new Ext.XTemplate(
			'<div class="x-grid3"><div><table>',
			'<thead class="x-grid3-header"><tr class="x-grid3-hd-row">',
			'<td class="x-grid3-hd x-grid3-cell x-grid3-hd-inner" style="width: 80px;color: blue;">编码</td>',
			'<td class="x-grid3-hd x-grid3-cell" style="width: 200px;color: blue;">名称</td>',
			'<td class="x-grid3-hd x-grid3-cell" style="width: 80px;color: blue;">收费类别</td>',
			'<td class="x-grid3-hd x-grid3-cell" style="width: 100px;color: blue;">类别</td>',
			'<td class="x-grid3-hd x-grid3-cell" style="width: 80px;color: blue;">医疗类别</td>',
			'</tr></thead><tbody>',
			'<tpl for=".">',
			'<tr class="x-combo-list-item">',
			'<td class="x-grid3-col x-grid3-cell"><div class="x-grid3-cell-inner"  style="font-size:12px;">{Code}</div></td>',
			'<td class="x-grid3-col x-grid3-cell"><div class="x-grid3-cell-inner"  style="font-size:12px;">{Name}</div></td>',
			'<td class="x-grid3-col x-grid3-cell"><div class="x-grid3-cell-inner"  style="font-size:12px;">{FeesCategory}</div></td>',
			'<td class="x-grid3-col x-grid3-cell"><div class="x-grid3-cell-inner"  style="font-size:12px;">{ItemCategory}</div></td>',
			'<td class="x-grid3-col x-grid3-cell"><div class="x-grid3-cell-inner"  style="font-size:12px;">{MedicalCategory}</div></td>',
			'</tr>', '</tpl>', '</tbody></table></div></div>')
});
Ext.reg('sicombo', Ext.ux.ServiceItemComboBox);